#pragma once

#include "SP.h"

class CECascadeSystem
{
	friend CECascadeSystem* CEGetCascadeSystem();
public:

	void Create( HWND hWnd, UINT width, UINT height );
	void SetWindow( UINT width, UINT height );

	//void SetBackgroundColour();

	void OnFrame();

	void NewEmitter();

	SP::SPModelViewerCamera* GetCamera(){ return m_pCamera; }
	void SetBGColor(XMFLOAT4 vColor){ m_vBGColor  = vColor; }
	void SetDrawCoordinate( bool draw ){ m_bDrawCoordinate = draw; }
	void SetPause( bool pause ){ m_bPause = pause; }

	void AddEmitter( SP::SPEmitter* pEmitter );
	void RemoveEmitter( SP::SPEmitter* pEmitter );

	void InitEmitter();

	void Import( const WCHAR* path );
private:	 
	CECascadeSystem();
	~CECascadeSystem();
	
	SP::SPModelViewerCamera* m_pCamera;

	bool m_bPause;	
	
	void DrawCoordinate();
	bool m_bDrawCoordinate;

	SP::SPEmitterList m_EmitterList;
	XMFLOAT4 m_vBGColor;
};

CECascadeSystem* CEGetCascadeSystem();